<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title></title>
    <style type="text/css">
        .foot {
            margin-top: 30px;
            text-align: center;
        }
    </style>
    <script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery-1.4.3.js"></script>
</head>
<body>
<div class="foot">
    <a href="javascript:toPage(1)">首页</a>
    <c:if test="${pageIndex != 1}">
        <a href="javascript:toPage(${pageIndex-1})">上一页</a>
    </c:if>
    <c:forEach begin="1" end="${totalPage}" var="page">
        <c:if test="${pageIndex==page}">
            <a class="current" href="javascript:void(0);">${page}</a>
        </c:if>
        <c:if test="${pageIndex!=page}">
            <a href="javascript:toPage(${page})">${page}</a>
        </c:if>
    </c:forEach>
    <c:if test="${pageIndex != totalPage}">
        <a href="javascript:toPage(${pageIndex+1})">下一页</a>
    </c:if>
    <a href="javascript:toPage(${totalPage})">尾页</a>
</div>
</body>
</html>
